import axios from './axios'
import resfulParamsToUrl from './resfulParamsToUrl'

// 医生添加
export const doctorInsert = params => {
	return axios
		.post(resfulParamsToUrl('/sys/auth/tDoctor/insert', params), params)
		.catch(() => {})
}
// 医生修改
export const doctorUpdate = params => {
	return axios
		.post(resfulParamsToUrl('/sys/auth/tDoctor/update', params), params)
		.catch(() => {})
}
// 医生删除
export const doctorDelete = params => {
	return axios
		.post(resfulParamsToUrl('/sys/auth/tDoctor/delete', params), params)
		.catch(() => {})
}
// 医生分页查询
export const getDoctorPageList = params => {
	return axios
		.post(resfulParamsToUrl('/sys/auth/tDoctor/pageList', params), params)
		.catch(() => {})
}
// 查询医生对象
export const getDoctorModel = params => {
	axios.prototype._loading_ = false
	return axios
		.post(resfulParamsToUrl('/sys/auth/tDoctor/getModel', params), params)
		.catch(() => {})
}
// 当前登录人机构，跟用户未绑定的医生集合
export const getUserDoctorList = params => {
	axios.prototype._loading_ = false
	return axios
		.post(
			resfulParamsToUrl('/sys/auth/tDoctor/getUserDoctorList', params),
			params,
		)
		.catch(() => {})
}

// 机构
export const getGetModel = params => {
	axios.prototype._loading_ = false
	return axios
		.post(resfulParamsToUrl('/sys/auth/tsysuser/getModel', params), params)
		.catch(() => {})
}
